/**
 * Copyright millionhere
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may see it at...
 *      http://www.apache.org/licenses/LICENSE-2.0
 */

package info.millionhere.keepsilent;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class KeepSilentReceiver extends BroadcastReceiver {

    static final String ACTION = "android.intent.action.BOOT_COMPLETED";

    @Override
    public void onReceive(Context context, Intent intent) 
    {
	if (intent.getAction().equals(ACTION)) 
	{
	    if (new ConfigXmlAdaptor().GetServiceOnBoot()){
		//StartService
		context.startService(new Intent(context, KeepSilentService.class));
	    }
	}
    }
}
